package asciiTablePrinting;

import java.util.ArrayList;

public class ASCIIStringColumn extends ASCIITableColumn{
	ArrayList<String> entries;

	public ASCIIStringColumn(ArrayList<String> headlines, ArrayList<String> entries, int columnWidth) {
		super(headlines,columnWidth);
		this.entries=entries;
	}
	
	public void setEntries(ArrayList<String> entries) {
		this.entries = entries;
	}

	@Override
	public String getEntry(int lineNumber) {
		String entry=entries.get(lineNumber);
		return String.format("%"+columnWidth+"s", entry);
	}

	@Override
	public int getEntryCount() {
		return entries.size();
	}
	
	
}
